﻿using System;
using System.Collections.Generic;
using System.Text;
using EFFC.Net.Data.Base;
using EFFC.Net.Logic;
using EFFC.Net.Common;
using EFFC.Net.Data.DBData;
using EFFC.Net.Interface;
using EFFC.Net.Resource;
using EFFC.Net.Parameters;
using EFFC.Net.Returns;
using EFFC.Net.WebBuilder.WebLogic;
using EFFC.Net.Manager;
using EFFC.Net.WebBuilder.Parameters;

namespace EFFC.Net.WebBuilder.WebManage
{
    public abstract class WebManager :BaseManager
    {
        /// <summary>
        /// 標注化查询接口
        /// </summary>
        /// <typeparam name="T">IQuery</typeparam>
        /// <param name="p"></param>
        /// <returns></returns>
        public abstract QueryReturn Query<T>(WebManageParameter p) where T : WebBaseLogic, IQuery;
        /// <summary>
        /// 標注化Update接口
        /// </summary>
        /// <typeparam name="T">IUpdate</typeparam>
        /// <param name="p"></param>
        /// <returns></returns>
        public abstract bool Update<T>(WebManageParameter p) where T : WebBaseLogic, IUpdate;
        /// <summary>
        /// 標注化Delete接口
        /// </summary>
        /// <typeparam name="T">IDelete</typeparam>
        /// <param name="p"></param>
        /// <returns></returns>
        public abstract bool Delete<T>(WebManageParameter p) where T : WebBaseLogic, IDelete;
        /// <summary>
        /// 標注化Insert接口
        /// </summary>
        /// <typeparam name="T">IInsert</typeparam>
        /// <param name="p"></param>
        /// <returns></returns>
        public abstract bool Insert<T>(WebManageParameter p) where T : WebBaseLogic, IInsert;
        /// <summary>
        /// 標注化翻页查询接口
        /// </summary>
        /// <typeparam name="T">IQueryByPage</typeparam>
        /// <param name="p"></param>
        /// <returns></returns>
        public abstract QueryByPageReturn QueryByPage<T>(WebManageParameter p) where T : WebBaseLogic, IQueryByPage;
        /// <summary>
        /// 標注化页面业务邏輯處理接口
        /// </summary>
        /// <typeparam name="T">IWebLogicProcess</typeparam>
        /// <param name="p"></param>
        /// <returns></returns>
        public abstract WebLogicRtn Process<T>(WebManageParameter p) where T : WebBaseLogic, IWebLogicProcess;
        /// <summary>
        /// 標注化Check处理接口
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="p"></param>
        /// <returns></returns>
        public abstract WebLogicCheckRtn Check<T>(WebManageParameter p) where T : WebBaseLogic, IWebLogicCheck;
        /// <summary>
        /// 標注化获取公共参数的邏輯處理接口
        /// </summary>
        /// <typeparam name="T">WebBaseLogic, IWebLogicCheck</typeparam>
        /// <param name="p">可扩展数组</param>
        /// <returns></returns>
        public abstract CommonLogicReturn GetValue<T>(params object[] p) where T : WebBaseLogic, ICommonLogic;
        /// <summary>
        /// 標注化判断是否存在的邏輯處理接口
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="p"></param>
        /// <returns></returns>
        public abstract IsExistsRtn IsExists<T>(ParametersStd p) where T : WebBaseLogic, IIsExists;
        /// <summary>
        /// 上传文件
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="p"></param>
        /// <returns></returns>
        public abstract FileUpLoadRtn UpLoadFile<T>(FileUpLoadParameters p) where T : WebBaseLogic, IUpLoadFile;
        /// <summary>
        /// 標注化文件資料下載的邏輯處理接口
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="p"></param>
        /// <returns></returns>
        public abstract DownLoadRtn DownLoad<T>(ParametersStd p) where T : WebBaseLogic, IDownLoad;
        /// <summary>
        /// 標注化文件資料移除的邏輯處理接口
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="p"></param>
        /// <returns></returns>
        public abstract RemoveAttachRtn RemoveFile<T>(ParametersStd p) where T : WebBaseLogic, IRemoveAttachFile;


    }

    
}
